package com.salt.modules.inform.mail.service;


import com.salt.admin.api.service.CrudService;
import com.salt.core.persistence.Page;
import com.salt.modules.inform.mail.entity.MailTrash;
import com.salt.modules.inform.mail.mapper.MailTrashMapper;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * 邮件Service
 * @author salt
 * @version 2020-12-28
 */
@Service
@Transactional(readOnly = true)
public class MailTrashService extends CrudService<MailTrashMapper, MailTrash> {

	public MailTrash get(String id) {
		return super.get(id);
	}

	public List<MailTrash> findList(MailTrash mailTrash) {
		return super.findList(mailTrash);
	}

	public Page<MailTrash> findPage(Page<MailTrash> page, MailTrash mailTrash) {
		return super.findPage(page, mailTrash);
	}

	@Transactional(readOnly = false)
	public void save(MailTrash mailTrash) {
		super.save(mailTrash);
	}

	@Transactional(readOnly = false)
	public void delete(MailTrash mailTrash) {
		super.delete(mailTrash);
	}

	public int getCount(MailTrash mailTrash) {
		return mapper.getCount(mailTrash);
	}

}
